<@html.doctype/>
<html>
    <@html.head>
    <link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/layout/css/layout_news.css" />
<link rel="stylesheet" type="text/css" href="${base}/includes/styles/skins/Green/layout/css/nth_match.css" />
    <link rel="stylesheet" type="text/css" href="${base}/includes/styles/skins/Green/layout/css/nth_apply.css" />
  <script type="text/javascript" src="../includes/js/jsLayout/tishi.js"></script>
    <script type="text/javascript">
    function checkNull(){
				var value = $(this).val().trim();
				if(value==""||value==null){		
					 $(this).next("span").show();
				} 
				  else
				  $(this).next("span").hide();
			}
        $(function(){
            $("#applierName").blur(function(){
                if (this.value.trim() == "" || this.value == null) {
                    $("#tipName").show();
                }
                else {
                    $("#tipName").hide();
					var username=$("#applierName").val().trim();
                    $.ajax({
                        url: "${base}/match/checkUserName.action",
                        dataType:"text",
                        data: {
                            userName:username
                        },
                        success: function(data,textStatus){
                            if (data == "true") 
                                $("#tipName2").hide();
                            else 
                                $("#tipName2").show();
                        }
                    });
                }
                
            });
            $(":input.require").blur(checkNull).focus(function(){
                $(this).next("span").hide();
            });
        });
        
        function checkform(){
            var str = true;
            $(":input.require").each(function(){
                if (this.value == null || this.value.trim() == "") {
                    str = false;
                    $("#tip").show();
                }
            });
            return str;
        }
    </script>
    </@html.head>
    <body>
        <@html.header></@html.header><@html.content>
        <div id="content">
            <@html.contentplace place="大赛-》申请参赛"/>
            <div id="apply_content">
                <div id="apply_content_left">
                    <h2><span class="personal_title">${compApp.compName}</span></h2>
                     <div class="detail">
                        <p>
                            &nbsp;&nbsp;&nbsp;&nbsp;${compApp.compDetail}
                        </p>
                        <ul class="message">
                            <li>
                                <span class="left">主办方：</span>
                                <a href="#">${compApp.applier.username}</a>
                            </li>
                            <li>
                                <span class="left">发布时间：</span>${compApp.pubTime} 
                            </li>
                            <li>
                                <span class="left">报名方式:</span>${compApp.appPattern}
                            </li>
                            <li>
                                <span class="left">报名截止日期：</span>${compApp.appEndDate}
                            </li>
                            <li>
                                <span class="left">负责人:</span>${compApp.applierName}
                            </li>
                            <li>
                                <span class="left">联系方式:</span>${compApp.community}
                            </li>
                            <#if compApp.pAddress?exists>
                            <li>
                                <span class="left">附件：</span>
                                <a href="downloadFile.action?downloadFileFileName=${compApp.pAddress}">${(compApp.attachmentName)!}</a>
                            </li>
                            </#if> 
                        </ul>
                    </div>
                    <form name="form1" method="post" class="editPart" action="${base}/match/compApply.action?compId=${compApp.compID}" id="form1">
                        <h2><span class="personal_title">填写申请表</span><span class="message_requried">*为必填项</span></h2>
                        <div class="personal_message">
                            <@s.token/>
                            <p class="text">
                                <label>
                                    大赛种类<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="type" type="text" id="ptype" disabled="true" value="${(compApp.ptype.type)!}"/>
                            </p>
                            <p class="text">
                                <label>
                                    大赛名称<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="compname" type="text" id="pname" disabled="true" ltype="text" value="${compApp.compName?default("")}" />
                            </p>
                            <p>
                                <label>
                                    姓名<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="attendList.applierName" type="text" id="applierName"/>
								<span id="tipName" class="formtips onError" style="display:none;">&nbsp;姓名不能为空</span>
                                <span id="tipName2" class="formtips onError" style="display:none;">用户名不正确</span>
                            </p>
                            <p>
                                <label>
                                    联系方式<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="attendList.contact" class="require" type="text" id="contact" />
                                 <span class="formtips onError" style="display:none;">请输入联系方式</span>
                            </p>
                            <p class="text">
                                <label>
                                    身份证号<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="attendList.idCard" class="require" type="text" id="IDCard" />
                                 <span class="formtips onError" style="display:none;">请输入身份证号</span>
                            </p>
                            <p class="text">
                                <label>
                                    所在学校或单位<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="attendList.constitution" class="require" type="text" id="constitution"/>
                                 <span class="formtips onError" style="display:none;">请输入所属单位</span>
                            </p>
                            <p class="text">
                                <input name="cmtsubmit" type="submit" id="cmtsubmit" onClick="return checkform();" class="submit" tabindex="5" value="提交"/>
                            </p>
                            <p class="text">
                                <span id="tip" class="formtips onError" style="display:none;">必填字段不得为空</span>
                            </p>
                            <p class="text">
                                <@s.actionmessage/><@s.actionerror/>
                            </p>
                        </div>
                    </form>
                </div>
                <div id="news_right_content">
        <div id="news_search">
          <form action="1.php" id="news_form">
          <input type="text" name="search"  id="search_1" placeholder="搜索新闻">
          <input type="submit" name value=" " id="search_2">
          </form>
        </div>
        
        
        <div id="news_tags">
           <div id="tags_title">
             <p>热门标签</p>
           </div>
           <div id="tags_con">
            
                    <ul>
                        <li>
                                                        <a href="${base}/match/toCompApp.action">
                                                            申请大赛
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="${base}/match/toCompAudit.action">
                                                            审核申请表
                                                        </a>
                                              </li>
                <li>交互设计 +</li>
                 <li>摄影印象 +</li>
                 <li>技术沙龙 +</li>
                 <li>用户研究 +</li>
                 <li>视觉设计 +</li>
							                                        
                    </ul>
					
           </div>
        </div>
        
        
        <div id="news_cat">
            <div id="cat_title"><p>竞赛公告</p></div>
            <div id="cat_con">
            	<div id="move">
            	<div id="move1">
             <marquee onmouseover=this.stop() onmouseout=this.start() 
                  		trueSpeed scrollAmount="1" scrollDelay="30" direction=down>
                <ul class="tishi">
                <#if compResultList?exists>  
							 <#list compResultList as result>
							  <li>
							  	<a href="${base}/match/showResult.action?compId=${result.compID}" title="header=[竞赛公告] body=[${result.resultTitle!}]">
                                      ${result.resultTitle?substring(0,12)}...
                                   </a></li>
							 </#list>
							 
					 </#if>    
                
              </ul>
              </marquee>
			  </div>
			  <div id="move2">
			  	
			  </div>
			  </div>
            </div>
        </div>
    </div>
</div>
</div>
</@html.content>

<@html.bottom>
	<!--请不要在此处添加内容-->
</@html.bottom>

</body>
</html>